# Maintainer: Dylan Van Assche <me@dylanvanassche.be>
# Contributor: Dylan Van Assche <me@dylanvanassche.be>
pkgname=solid-calendar-store
pkgver=0.0.18
pkgrel=0
pkgdesc="Solid stores for managing calendars"
url="https://github.com/KNowledgeOnWebScale/solid-calendar-store"
arch="all !riscv64" # disabled on riscv64 due to missing nodejs
license="MIT"
depends="nodejs>=12"
makedepends="npm solid-community-server rmlmapper python3"
arch="!x86" # textrels
options="!check"
source="https://github.com/KNowledgeOnWebScale/solid-calendar-store/archive/v$pkgver/solid-calendar-store-$pkgver.tar.gz"

build() {
	npm install --include=dev
	npm run build
}

check() {
	npm run test
}

package() {
	# Solid Calendar Store is a plugin for the Solid Community Server
	mkdir -p "$pkgdir"/usr/share/webapps/solid-community-server/solid-calendar-store

	cp -r "$builddir"/package.json \
		"$builddir"/config \
		"$builddir"/dist \
		"$builddir"/node_modules \
		"$pkgdir"/usr/share/webapps/solid-community-server/solid-calendar-store
}


sha512sums="
52f48a8525291af524910576e5350080b94da7ec296e985b995ff8747c4938cf1dbed60d5961685d0ecec1d5f6520a4f043e8cb5997204de4ed354f2dabc893e  solid-calendar-store-0.0.18.tar.gz
"
